<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<html>
<head>
    <title>APP版本参数配置管理</title>
    <meta name="decorator" content="default"/>
    <script type="text/javascript">
        $(document).ready(function () {
            //$("#name").focus();
            $("#inputForm").validate({
                submitHandler: function (form) {
                    loading('正在提交，请稍等...');
                    form.submit();
                },
                errorContainer: "#messageBox",
                errorPlacement: function (error, element) {
                    $("#messageBox").text("输入有误，请先更正。");
                    if (element.is(":checkbox") || element.is(":radio") || element.parent().is(".input-append")) {
                        error.appendTo(element.parent().parent());
                    } else {
                        error.insertAfter(element);
                    }
                }
            });
        });
    </script>
</head>
<body>
<ul class="nav nav-tabs">
    <li><a href="${ctx}/version/appVersion/">APP版本参数配置列表</a></li>
    <li class="active"><a
            href="${ctx}/version/appVersion/form?id=${appVersion.id}">APP版本参数配置${not empty appVersion.id?'修改':'添加'}</a>
    </li>
</ul>
<br/>
<form:form id="inputForm" modelAttribute="appVersion" action="${ctx}/version/appVersion/save" method="post"
           class="form-horizontal">
    <form:hidden path="id"/>
    <sys:message content="${message}"/>
    <div class="control-group">
        <label class="control-label">版本号：</label>
        <div class="controls">
            <form:input path="versionCode" htmlEscape="false" maxlength="11" class="input-xlarge required"/>
            <span class="help-inline"><font color="red">*</font> </span>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">版本名称：</label>
        <div class="controls">
            <form:input path="versionName" htmlEscape="false" maxlength="50" class="input-xlarge required"/>
            <span class="help-inline"><font color="red">*</font> </span>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">版本描述：</label>
        <div class="controls">
            <form:input path="description" htmlEscape="false" maxlength="500" class="input-xlarge "/>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">是否禁用升级：</label>
        <div class="controls">
            <form:select path="isForceUpdate" class="input-xlarge ">
                <form:options items="${fns:getIsOrNoList()}" itemLabel="label" itemValue="code" htmlEscape="false"/>
            </form:select>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">发布状态：</label>
        <div class="controls">
            <form:select path="publishStatus" class="input-xlarge ">
                <form:options items="${fns:getIsOrNoList()}" itemLabel="label" itemValue="code" htmlEscape="false"/>
            </form:select>
        </div>
    </div>
    <%--<div class="control-group">
        <label class="control-label">common_need_update：</label>
        <div class="controls">
            <form:input path="commonNeedUpdate" htmlEscape="false" maxlength="1" class="input-xlarge "/>
        </div>
    </div>--%>
    <div class="control-group">
        <label class="control-label">APP链接：</label>
        <div class="controls">
            <form:input path="versionUrl" htmlEscape="false" maxlength="255" class="input-xlarge "/>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">APP大小：</label>
        <div class="controls">
            <form:input path="versionSize" htmlEscape="false" maxlength="64" class="input-xlarge "/>
        </div>
    </div>
    <%--<div class="control-group">
        <label class="control-label">是否刪除：</label>
        <div class="controls">
            <form:select path="isDeleted" class="input-xlarge ">
                <form:options items="${fns:getIsOrNoList()}" itemLabel="label" itemValue="code" htmlEscape="false"/>
            </form:select>
        </div>
    </div>--%>
    <div class="form-actions">
        <input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;
        <input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
    </div>
</form:form>
</body>
</html>